package com.example.demo.services;

import com.example.demo.entity.UserEntity;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.stereotype.Service;

/**
 * @author rqian
 */
@Service
public interface CustomUserService extends UserDetailsService {
    /**
     * save user base on user entity data and queried role
     *
     * @param userEntity
     *         user entity data.
     * @param role
     *         role name.
     * @return saved user.
     */
    UserEntity saveUser(final UserEntity userEntity, final String role);
}
